﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="BuscarCliente.aspx.cs"  ClassName="Default.css" Inherits="Admin_BuscarCliente" %>

<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>
    
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>Buscar Cliente</title>
    <link href="../App_Themes/Default.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <asp:ScriptManager ID="ScriptManager1" runat="server" AsyncPostBackTimeout="270">
            </asp:ScriptManager>
            <asp:UpdateProgress ID="UpdateProgress1" runat="server" DisplayAfter="100">
                 <ProgressTemplate>
                    <img alt="" height="20" src="../Images/25-1.gif" />
                    &nbsp;&nbsp; Buscando Clientes
                </ProgressTemplate>
            </asp:UpdateProgress>               
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
                    <table class="tablaForm" width="100%">
                        <tr>
                            <td class="tdVentas" colspan="2" style="height: 17px">
                                Buscar Clientes</td>
                        </tr>
                        <tr>
                            <td align="right" class="tdForm" style="width: 20%; border: #aaaaaa 1px solid;
	                    padding: 2px;
	                    font-size: 9px;
	                    color: #333333;
	                    background-color: gainsboro;
	                    text-align: right;">
                                C&oacute;digo:</td>
                            <td class="tdForm" style="width: 80%; text-align:left ;border: #aaaaaa 1px solid;	padding: 2px; font-size: 9px; color: #333333; background-color: gainsboro; 	text-align: left" >
                                <asp:TextBox ID="txtIdCliente" runat="server" class="cuadrotxt100"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td align="right" class="tdLiteral" style="width: 20%;border: #aaaaaa 1px solid;
	                    padding: 2px;
	                    font-size: 9px;
	                    color: #333333;
	                    background-color: gainsboro;
	                    text-align: right;">
                                Cliente:</td>
                            <td class="tdForm" style="width: 80%; text-align:left ;border: #aaaaaa 1px solid;	padding: 2px; font-size: 9px; color: #333333; background-color: gainsboro;
	                    text-align: lert">
                                <asp:TextBox ID="txtCliente" runat="server" class="cuadrotxt100"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td align="center" class="tdBotones" colspan="2" style="BORDER-RIGHT: #aaaaaa 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: #aaaaaa 1px solid; PADDING-LEFT: 4px; PADDING-BOTTOM: 4px; BORDER-LEFT: #aaaaaa 1px solid; PADDING-TOP: 4px; BORDER-BOTTOM: #aaaaaa 1px solid; BACKGROUND-COLOR: #dfdfdd; TEXT-ALIGN: center">
                                &nbsp;<asp:Button ID="btnBuscar" runat="server" OnClick="btnBuscar_Click" Text="Buscar"
                                    Width="75px" />&nbsp;
                                <input id="btnCancelar" type="button" value="Cancelar"  onclick="javascript:window.close();" style="width: 75px"/></td>
                        </tr>
                        <tr align="center">
                            <td colspan="2" class="tdForm" style="width: 100%">
                                <asp:GridView ID="gvClientes" runat="server" BorderWidth="1px" BackColor="White" Width="100%" AllowPaging="True" AutoGenerateColumns="False"
                                    CellPadding="3" DataKeyNames="Id_Cliente" GridLines="Vertical" OnPageIndexChanging="gvClientes_PageIndexChanging"
                                    OnRowDataBound="gvClientes_RowDataBound"
                                    OnSelectedIndexChanged="gvClientes_SelectedIndexChanged" EmptyDataText="No hay datos a mostrar"
                                    BorderColor="#999999" BorderStyle="None">
                                    <FooterStyle BackColor="#CCCCCC" ForeColor="Black"></FooterStyle>
                                    <Columns>
                                        <asp:TemplateField HeaderText="C&#243;digo">
                                            <HeaderStyle ForeColor="White" />
                                            <ItemTemplate>
                                                <asp:Label ID="gvIdCliente" runat="server" Text='<%# Bind("Id_Cliente") %>'></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Concepto">
                                            <HeaderStyle ForeColor="White" />
                                            <ItemTemplate>
                                                <asp:Label ID="gvCliente" runat="server" Text='<%# Bind("Nombre") %>'></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Saldo">
                                            <HeaderStyle ForeColor="White" />
                                            <ItemTemplate>
                                                <asp:Label ID="gvSaldo" runat="server" Text='<%# Bind("Saldo", "{0:F2}") %>'></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                         <asp:TemplateField HeaderText="Direccion">
                                            <HeaderStyle ForeColor="White" />
                                            <ItemTemplate>
                                                <asp:Label ID="gvDireccion" runat="server" Text='<%# Bind("Direccion") %>'></asp:Label>
                                            </ItemTemplate>
                                            <ItemStyle HorizontalAlign="Left" />
                                        </asp:TemplateField>
                                        <asp:TemplateField ShowHeader="False">
                                            <HeaderStyle ForeColor="White" />
                                            <ItemTemplate>
                                                <a href="javascript:returnvalue('<%# ((GridViewRow)Container).FindControl("gvIdCliente").ClientID%>','<%# ((GridViewRow)Container).FindControl("gvCliente").ClientID%>','<%# ((GridViewRow)Container).FindControl("gvSaldo").ClientID%>','<%# ((GridViewRow)Container).FindControl("gvDireccion").ClientID%>')">Seleccionar</a> 
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                    </Columns>
                                    <RowStyle BackColor="#EEEEEE" ForeColor="Black" HorizontalAlign="Center"></RowStyle>
                                    <EditRowStyle Wrap="True"></EditRowStyle>
                                    <SelectedRowStyle BackColor="#008A8C" ForeColor="White" Font-Bold="True"></SelectedRowStyle>
                                    <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center"></PagerStyle>
                                    <HeaderStyle BackColor="#325FB9" ForeColor="White" Font-Names="Arial Rounded MT Bold" Font-Bold="True"></HeaderStyle>
                                    <AlternatingRowStyle BackColor="Gainsboro"></AlternatingRowStyle>
                                </asp:GridView>
                            </td>
                        </tr>
        </table>
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
    </form>
</body>
</html>
